From 216055233b181885989f79c1852e466267fd1a85 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Mon, 24 Apr 2006 18:52:00 +0000 Subject: [PATCH] Adjust data types to get same results on 32- and 64-bit systems. --- gpsbabel/an1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsbabel/an1.c b/gpsbabel/an1.c index 05e980489..c56806698 100644 --- a/gpsbabel/an1.c +++ b/gpsbabel/an1.c @@ -22,6 +22,7 @@ #include #include #include +#include #define MYNAME "an1" #include "defs.h" @@ -205,14 +206,13 @@ Skip(FILE * f, static double DecodeOrd( long ord ) { - return ((double)(long)(0x80000000L-ord))/(0x800000); + return (double)((gbint32)(0x80000000 - ord)) / 0x800000; } static long EncodeOrd( double ord ) { - long tmp = ord * 0x800000; - return 0x80000000L-tmp; + return (gbint32)(0x80000000 - (gbint32)(ord * 0x800000)); } static int -- 2.30.2